package edu.whut.mall.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import edu.whut.mall.common.mybatis.ParamsMap;
import edu.whut.mall.user.model.Address;
import edu.whut.mall.user.vo.AddressVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author Dary
 * @projectName mall-refactor
 * @description: 自定义收获地址mapper
 * @date 2021/6/28 16:28
 */

@Mapper
public interface AddressMapper extends BaseMapper<Address> {

    AddressVo getOneUserAddressById(ParamsMap map);

    AddressVo getOneUserAddressByAll(ParamsMap map);

    Boolean restoreOneUserAddress(ParamsMap map);

    Boolean updateOneUserAddressById(Address address);

    Address selectById(ParamsMap map);

    Boolean deleteOneUserAddressById(ParamsMap map);

    Boolean updateOneUserAddressAsDefault(ParamsMap map);

    Boolean updateOneUserAddressFreeDefault(ParamsMap map);

    AddressVo getOneUserAddressAsDefaultById(ParamsMap map);

    List<AddressVo> findPageByAddress(ParamsMap map);

    Integer findCountByAddress(ParamsMap map);
}
